<include file="default_header" />

<body class="register-bg">
	<div class="wraper bottom-none">
		<div class="load">
			<img class="load-bee" src="/assets/base/repair/images/load-bee.png"/>
		</div>
		<a href="javascript:history.back(-1)" class="back">
			<img src="/assets/base/center/default/images/return.png"/>
		</a>
		<div class="identity"><img src="/assets/base/center/default/images/student.png"/></div>
		<div class="form-child clearfix">
			<span class="pull-left">学号</span>
			<input class="pull-left" placeholder="请输入您的学号" id="number" value="{BEESCRM:$data['number']}">
		</div>
		<div class="form-child clearfix">
			<span class="pull-left">姓名</span>
			<input class="pull-left" placeholder="请输入您的真实姓名" id="username" value="{BEESCRM:$data['username']}">
		</div>
		<div class="form-child clearfix">
			<span class="pull-left">手机</span>
			<input class="pull-left" placeholder="请输入您的手机号码" id="mobile" value="{BEESCRM:$data['mobile']}">
		</div>
		<div class="form-child clearfix">
			<span class="pull-left">验证码</span>
			<input class="pull-left" placeholder="请输入您的短信验证码" id="smsVerifyCode" value="">
		</div>
		<div class="clearfix">
			<div class="form-child build clearfix pull-left">
			<span class="pull-left">楼号</span>
			<input class="pull-left" placeholder="输入楼号" id="building_name" value="{BEESCRM:$data['building_name']}">
		</div>
		<div class="form-child room clearfix pull-left">
			<span class="pull-left">寝室</span>
			<input class="pull-left" placeholder="输入寝室号" id="room" value="{BEESCRM:$data['room']}">
			<input type="hidden" id="register_id" value="{BEESCRM:$data['register_id']}">
		</div>
	</div>
	<a href="javascript:void(0)" class="register-btn"><img src="/assets/base/center/default/images/btn.png"/></a>
        <if condition="$remark">
            <include file="remark"/>
        </if>
	<div class="bottom-box">
		<p class="copyright">杭州青橄榄网络技术有限公司 技术支持</p>
	</div>

<!--<div class="da_toast">
   <div class="da_body da_loading">
      <div class="da_animate">
         <div class="da_loading_leaf da_loading_leaf_0"></div>
         <div class="da_loading_leaf da_loading_leaf_1"></div>
         <div class="da_loading_leaf da_loading_leaf_2"></div>
         <div class="da_loading_leaf da_loading_leaf_3"></div>
         <div class="da_loading_leaf da_loading_leaf_4"></div>
         <div class="da_loading_leaf da_loading_leaf_5"></div>
         <div class="da_loading_leaf da_loading_leaf_6"></div>
         <div class="da_loading_leaf da_loading_leaf_7"></div>
         <div class="da_loading_leaf da_loading_leaf_8"></div>
         <div class="da_loading_leaf da_loading_leaf_9"></div>
         <div class="da_loading_leaf da_loading_leaf_10"></div>
         <div class="da_loading_leaf da_loading_leaf_11"></div>
      </div>
   </div>
  <div class="da_body da_success">
    <i class="iconfont icon-shouye"></i>
  </div>
   <p class="da_toast_content">数据加载中</p>
</div>-->

</div>

<include file="common_js" />
<script>
 var height = $(window).height();
 var bottombox_height = $('.bottom-box').outerHeight();
 $('.wraper').css("minHeight",height);
 $('.wraper').css("paddingBottom",bottombox_height);

 var height = $(window).height();
 $('.wraper').css('minHeight',height);
 $(function(){
  $('.register-btn').click(function(){
   var data={};
   var verify_method = /^(?:13\d|15\d|18\d|17\d|14\d)\d{5}(\d{3}|\*{3})$/;
   data.username=$('#username').val();
   data.mobile=$('#mobile').val();
   data.number=$('#number').val();
   data.register_id=$('#register_id').val();
   data.short_number=Number($('#short_number').val());
   data.building_name=$('#building_name').val();
   data.room=$('#room').val();
   if (!data.number || data.number.length>15) {
    $.alert('error','请输入正确的学号或工号');
    return false;
   }else if (!data.username) {
    $.alert('error','姓名不能为空');
    return false;
   }else if(!data.mobile){
    $.alert('error','手机号不能为空');
    return false;
   }else if (!verify_method.test(data.mobile)) {
    $.alert('error','请输入正确的手机号');
    return false;
   }else if ((data.short_number<100000 || data.short_number>9999999) && data.short_number){
    $.alert('error','请输入六位或七位的短号');
    return false;
   }

   /*else if (!data.building_name){
    $.alert('error','请填写寝室楼号');
    return false;
   }else if (!data.room){
    $.alert('error','请填写寝室号');
    return false;
   }*/
   var json={};
   json.method='post';
   json.type='json';
   json.url="{BEESCRM::U('/base/center/sReg',array('wechat_id'=>$wechat_id))}";
   json.data=data;
   $.getAjax(json,true,reload,'');
  });
  function reload(){
   setTimeout('location.href="{BEESCRM::U('/base/center/center',array('wechat_id'=>$wechat_id))}"',3000);
  }
 })
</script>
</body>
</html>